package controllers

import (
	"github.com/astaxie/beego"
)

type MainController struct {
	beego.Controller
}

func (c *MainController) withLayout(folder, pName string) {
	c.Layout = "layout.html"
	c.TplName = folder + "/" + pName + ".html"
}

func (c *MainController) Get() {
	c.Layout = "layout.html"
	c.TplName = "index.html"
	//c.LayoutSections = make(map[string]string)
	//c.LayoutSections["Navi"] = "navi.html"
}

func (c *MainController) Settings() {
	c.withLayout("c", "参数配置")
}
func (c *MainController) RouterSet() {
	c.withLayout("c", "RouterSet")
}
func (c *MainController) ControlFunc() {
	c.withLayout("c", "ControlFunc")
}

func (c *MainController) XSRF() {
	c.withLayout("c", "XSRF")
}

func (c *MainController) RequestHander() {
	c.withLayout("c", "requestHander")
}
func (c *MainController) SessionOne() {
	c.withLayout("c", "SessionOne")
}
func (c *MainController) Filter() {
	c.withLayout("c", "Filter")
}

func (c *MainController) RevURL() {
	c.withLayout("c", "RevURL")
}
func (c *MainController) OutputData() {
	c.withLayout("c", "OutputData")
}
func (c *MainController) AbortError() {
	c.withLayout("c", "AbortError")
}

func (c *MainController) Loggers() {
	c.withLayout("c", "Loggers")
}
func (c *MainController) Sum() {
	c.withLayout("v", "Sum")
}
func (c *MainController) Handle() {
	c.withLayout("v", "Handle")
}
func (c *MainController) TplFunc() {
	c.withLayout("v", "TplFunc")
}
func (c *MainController) Summ() {
	c.withLayout("m", "Sum")
}
func (c *MainController) Prepare() {
	c.withLayout("m", "Prepare")
}
func (c *MainController) Crud() {
	c.withLayout("m", "crud")
}
func (c *MainController) ComplicateSql() {
	c.withLayout("m", "ComplicateSql")
}
func (c *MainController) Indisession() {
	c.withLayout("cube", "Indisession")
}
